<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<style type="text/css">
<!--
#style {

	background:#FFC;
}
-->
</style>
</head>

<body>
<table width="537" border="1" align="center" id="style">
  <tr><td colspan="8" align="center">Xem Đơn Hàng</td></tr>
  <tr>
    <td align="center">idDH</td>
    <td align="center">idMay</td>
    <td align="center">SoLuong</td>
    <td align="center">DonGia</td>
    <td align="center">ThoiDiemGiaoHang</td>
    <td align="center">TenNguoiNhan</td>
    <td align="center">DiaDiemGiaoHang</td>
  </tr>
  <?php 
  if(!isset($_SESSION['UserName']))
{
//	include "formdangnhap.php"; 
echo "<script language='javascript'>alert(' Bạn Phải Đăng Nhập !'); location.href='../index.php';</script>";
}
  	require_once("connect/dbcon.php");
	$s="SELECT * FROM donhang,donhangchitiet where donhang.idDH=donhangchitiet.idDH";
	$kq=mysql_query($s,$link);
	while($d=mysql_fetch_array($kq))
		{
  ?>
  <tr>
    <td width="50"><?php echo $d["idDH"];?></td>
    <td width="50"><?php echo $d["idMay"];?></td>
    <td width="60"><?php echo $d["SoLuong"];?></td>
    <td width="77"><?php echo $d["DonGia"];?></td>
    <td width="100"><?php echo $d["ThoiDiemGiaoHang"];?></td>
    <td width="100"><?php echo $d["TenNguoiNhan"];?></td>
    <td width="100"><?php echo $d["DiaDiemGiaoHang"];?></td>
  </tr>
	<?php }?>
</table>

</body>
</html>
